//
//  CYGHotsBlurCell.m
//  CYGHuntForCity
//
//  Created by cygarm on 16/3/11.
//  Copyright © 2016年 cygarm. All rights reserved.
//

#import "CYGHotsBlurCell.h"

@interface CYGHotsBlurCell ()

@property (weak, nonatomic) IBOutlet UIButton *iconBtn;
@property (weak, nonatomic) IBOutlet UILabel *title;

@end

@implementation CYGHotsBlurCell

- (void)awakeFromNib {
	
}

+ (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath ofModel:(CYGHotsBlurCellModel *)model {
	static NSString *cellId = @"idHotsCell";
	CYGHotsBlurCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellId forIndexPath:indexPath];
	if (cell == nil) {
		cell = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil] lastObject];
	}
	
	[cell.iconBtn setImage:[UIImage imageNamed:model.icon] forState:UIControlStateNormal];
	cell.title.text = model.title;
	
	return cell;
}

@end
